from pathlib import Path
import sys
platform = sys.platform.lower()
current_dir = str(Path(__file__).parent)
jar_path = f"{current_dir}/libs/plantuml.1.2020.0.jar"
program = 'nohup java ' if platform == 'darwin' else 'java'
cmd_plantuml = f'{program} -jar   {jar_path} -tsvg -charset UTF-8 '


def produce_cmd_plantuml(source, target):
    '''生成执行命令'''
    return f"{ cmd_plantuml } -o {target} {source}"
